package local.blueheart.java8;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;

public class Test3 {

    public static void main(String[] args) {
        List<String> list = Arrays.asList("hello", "world", "hello world");
        List<String> list2 = new ArrayList<>();
        list.stream().map(item->item.toUpperCase()).forEach(item-> System.out.println(item));
        list.stream().map(String::toUpperCase).forEach(item-> System.out.println(item));
        list.stream().map(String::toUpperCase).forEach(System.out::println);

        Function<String,String> function = String::toUpperCase;
        System.out.println(function.getClass().getInterfaces()[0]);
    }

}
